"""
传参的函数和返回值以及注释
"""


def add(x, y):
    """
    计算和
    :param x: 参数1
    :param y: 参数2
    :return: 返回值
    """
    result = x + y
    return result


# result1 = add(2, 2)
# print(result1)


def f1():
    print("方法1")


def f2():
    f1()
    print("方法2")


f2()


num = 100


def pri():
    print(num)


def pri2():
    # num = 200  如果直接这样修改不会对外面的全局变量产生影响
    global num
    num = 200
    print(num)


pri()
pri2()
print(num)
